/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */


import demo903.*;
import java.util.Arrays;

/**
 *
 * @author Administrator
 */
public class PlusDemo {
    int x[]={1,2,3};
    String y[]={"one","two","three"};
    public  int getNum1(String s){
        for(int i=0;i<y.length;i++){
            if(s.equals(y[i])){
                return x[i];
            }
        }
       return -1; 
       
}
public static int getNum(String s){
   if(s.equals("one")){
       return 1;
   }else if(s.equals("two")){
       return 2;
   }
   else{
       return 3;
   }
}
    public static void main(String args[]) {
       System.out.println(getNum("one")); 
       PlusDemo plusDemo=new PlusDemo();
       System.out.println(plusDemo.getNum1("two"));
       
        
        
        
        
        

    }
}
